<!doctype html>
<html>
<head>
<script src="../../../../resources/js-test.js"></script>
</head>
<body>
<script>
description("document.implementation.createDocument with current document's DOCTYPE.")

var doctype = document.doctype;
var doc;
shouldNotThrow("doc = document.implementation.createDocument(null, null, document.doctype)");
shouldBe('doc.doctype', 'doctype');
shouldBe('doc.firstChild', 'doctype');
shouldBe('document.doctype', 'null');
</script>
</body>
</html>
